package edu.zut.hb.software.train.WayManager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;
import edu.zut.hb.software.train.Way.dao.WayDao;
import edu.zut.hb.software.train.Way.domain.Way;
import edu.zut.hb.software.train.WayManager.service.WayManager;


@Service("wayManager")
public class WayManagerImpl extends GenericManagerImpl<Way, Long> implements WayManager {

	
	WayDao wayDao;
	
	@Autowired
	public void setWayDao(WayDao wayDao) {
		this.wayDao = wayDao;
		this.dao = this.wayDao;
	}

	@Override
	public List<Way> getAll() {
		List<Way> all = this.wayDao.findAll();
		if (logger.isInfoEnabled()) {
			logger.info("getAll() - List<Way> all={}", all); //$NON-NLS-1$
		}
		return all;
	}
 
}